export default ()=>{
	const token = uni.getStorageSync('token');
		if (token) {
			return new Promise((resolve, reject)=>{
				uni.request({
					url: 'http://web.woniulab.com:8005/user/getUserInfo',
					method: 'GET',
					header: { Authorization: token },
					data: { token },
					success: ({ data }) => {
						// console.log(data);
					
						getApp().globalData.userInfo = data[0];
						let result = { code:1 ,data:data[0] };
						resolve(result);
					
					
					}
				});
					
			});
			
		}
	
};
